package com.carrent.demo.Service.Impl;

import com.carrent.demo.Domain.ComplicatedInformation;
import com.carrent.demo.Domain.Contract;
import com.carrent.demo.Mapper.ComplicatedInformationMapper;
import com.carrent.demo.Service.ComplicatedInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Service
public class ComplicatedInformationServiceImpl implements ComplicatedInformationService {

    @Autowired
    ComplicatedInformationMapper complicatedInformationMapper;

    @Override
    public List<ComplicatedInformation> getPage(Integer start, Integer pageSize, String name, String beginTime, String endTime) {
        final List<ComplicatedInformation> page = complicatedInformationMapper.getPage(start, pageSize, name,beginTime,endTime);
        return page;
    }

    @Override
    public Integer getCount(String name, String beginTime, String endTime) {
        return complicatedInformationMapper.getCount(name,beginTime,endTime);
    }

    @Override
    public Boolean editContract(ComplicatedInformation complicatedInformation) throws ParseException {
        final Boolean aBoolean = complicatedInformationMapper.editContract(complicatedInformation);
        return  aBoolean;
    }
}
